package cn.aimer.hrm.controller;

import cn.aimer.hrm.service.ISmsVerifyCodeService;
import cn.aimer.hrm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/smsVerifyCode")
public class SmsVerifyCodeController {

    @Autowired
    private ISmsVerifyCodeService smsVerifyCodeService;

    @PostMapping("/verify")
    public AjaxResult verifySmsCode (@RequestBody Map<String,String> params){
        return smsVerifyCodeService.verifySmsCode(params);
    }
    @PostMapping("/sendVerifyCode") //发送短信验证码
    public AjaxResult sendVerifyCode(@RequestBody Map<String,String> params){
        return smsVerifyCodeService.sendCode(params);
    }
}